<?xml version='1.0' encoding='UTF-8' ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:h="http://java.sun.com/jsf/html"
      xmlns:f="http://java.sun.com/jsf/core"
      xmlns:p="http://primefaces.org/ui">
    <h:head>
        <title>edit Credit</title>
    </h:head>
    <h:body>
        <f:view>
            <h:form>
                <h:outputText value="Edit"/>
                <h:panelGrid columns="2" cellpadding="10" cellspacing="10">
                    <p:outputLabel for="pin" value="Pin Code " />
                    <p:inplace editor="true">
                        <p:inputText required="true" id="pin" value="#{creditView.editedCredit.pin}" />
                    </p:inplace>
                    <p:outputLabel value="Select Voucher" />
                    <p:inplace editor="true">
                        <p:selectOneMenu value="#{creditView.editedCredit.companyDenomination.id}" >
                            <f:selectItems value="#{creditView.companyDenominationView.allCompanyDenominations}" var="compDenom"
                                           itemLabel="#{compDenom.company.name}-#{compDenom.denomination.currency} #{compDenom.denomination.amount.toString()}" itemValue="#{compDenom.id}" />
                        </p:selectOneMenu>
                    </p:inplace>
                    <p:commandButton value="update" action="#{creditView.updateEditedcredit}" ajax="false" immediate="true"/>
                </h:panelGrid>
            </h:form>
        </f:view>
    </h:body>
</html>

